package cn.wowjoy.pda.android_pharmacy.mvvm.vm.staticH;

import com.github.jdsjlzx.recyclerview.LRecyclerViewAdapter;

import java.util.ArrayList;
import java.util.List;

import cn.bingoogolapple.androidcommon.adapter.BGABindingRecyclerViewAdapter;
import cn.wowjoy.pda.android_pharmacy.R;
import cn.wowjoy.pda.android_pharmacy.common.core.BaseViewModel;
import cn.wowjoy.pda.android_pharmacy.databinding.ItemRvHospitalMedicineDetailBinding;
import cn.wowjoy.pda.android_pharmacy.model.xmlEntity.inHospitalPatientInfo.InHospitalPatientBeen;

/**
 * Created by Administrator on 2017/8/16.
 */

public class StaticSendDetailViewModel extends BaseViewModel {
    public  ArrayList<InHospitalPatientBeen> datas;

    public BGABindingRecyclerViewAdapter<InHospitalPatientBeen, ItemRvHospitalMedicineDetailBinding> wlinnerAdapter = new BGABindingRecyclerViewAdapter<>(R.layout.item_rv_hospital_medicine_detail);
    public LRecyclerViewAdapter wladapter = new LRecyclerViewAdapter(wlinnerAdapter);


    public void setWData(List<InHospitalPatientBeen> data) {
        if (null == datas)
            datas = new ArrayList<>();
        datas.clear();
        datas.addAll(data);
        wlinnerAdapter.setData(datas);
        wladapter.removeFooterView();
        wladapter.removeHeaderView();
        wladapter.notifyDataSetChanged();
    }
}
